﻿/**************************************************************************
创建时间:	2019/5/23
作	  者:	张存
邮 	  箱:	zhangcunliang@126.com

Copyright (c) zhcun.cn

描	述：
记	录：
***************************************************************************/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.Design;

namespace ASmile.Win.Controls
{
    [ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.ToolStrip)]
    public class ToolStripEditText : ToolStripControlHost
    {
        public ToolStripEditText()
            : base(new EditText())
        {
            _EditBox = Control as EditText;
        }

        EditText _EditBox;

        [Description("文本框控件")]
        public EditText EditControl
        {
            get
            {
                return Control as EditText;
            }
        }

        /// <summary>
        /// 空字符提示文本
        /// </summary>
        [Description("空字符提示文本")]
        public string EmptyTextTip
        {
            get
            {
                return EditControl.EmptyTextTip;
            }
            set
            {
                EditControl.EmptyTextTip = value;
            }
        }
        /// <summary>
        /// 空字符提示文本颜色
        /// </summary>
        [Description("空字符文本的颜色")]
        public Color EmptyTextTipColor { get; set; }

        /// <summary>
        /// 空字符提示文本颜色
        /// </summary>
        [Description("文本控件名称")]
        public string TextName
        {
            set { Control.Name = value; }
            get { return Control.Name; }
        }

    }
}